<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ page import="java.util.*"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>演示在页面上只有一个克隆表达式时的情况</title>
    <script type="text/javascript" src="<%=request.getContextPath()%>/scripts/jsframework.js"></script>
	<script type="text/javascript" src="<%=request.getContextPath()%>/scripts/Union/dateUtil.js"></script>
    <script src="<%=request.getContextPath()%>/js/calendar/zh_CN_WdatePicker.js"></script>
	<script src="<%=request.getContextPath()%>/js/crontab/Simple_util.js"></script>
	<script src="<%=request.getContextPath()%>/js/crontab/Crontab.js"></script>
	<script src="<%=request.getContextPath()%>/js/crontab/Crontab_data_zh_CN.js"></script>
</head>
    <body>
    <center>
		初始化一个克隆表达式控件
        <hr />
        <table border="2">
	        <tr>
	        	<td colspan="2">
	        		<input onclick="init(this.value);" name="rdo" type="radio" value="" />默认
	        		<input onclick="init(this.value);" name="rdo" type="radio" value="daily" />每天
	        		<input onclick="init(this.value);" name="rdo" type="radio" value="weekly" />每周
	        		<input onclick="init(this.value);" name="rdo" type="radio" value="monthly" />每月
	        	</td>
	        </tr>
            <tr>
                <td><div id="demoDiv"></div></td>
                <td>
                    <button onclick="demo();">点击我查看结果</button>
                </td>
            </tr>
        </table>
        <script>
        	function init(val){
        		if(val){
		        	Crontab.Method.init("demoDiv",val); // 初始化方法 指定初始化的格式
        		}else{
	        		Crontab.Method.init("demoDiv"); // 初始化方法
        		}
        	}
        	function demo(){
				var data = Crontab.Data.get.getData(); // 获取值
				alert(data);
        	}
        </script>
        <hr />
    </body>
</html>